package com.yunji.base.mapper;

import com.github.yulichang.base.MPJBaseMapper;
import com.yunji.base.dto.AgentFieldDTO;
import com.yunji.common.model.domain.AgentDO;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * @Package com.yunji.user.mapper
 * FileName:	AgentMapper.java
 * Copyright:	Copyright © 2024 All Rights Reserved
 * Company:		云集互联
 * @version: 1.0
 * @since: JDK 1.8.0_202
 * Create at:   2024-08-21 10:50:16.811
 * Description:
 * 代理信息数据交互
 * Modification History:
 * Author					Date						Version			Description
 * --------------------------------------------------------------------------------
 * HuaAo				2024-08-21 10:50:16			1.0				1.0 Version
 */
public interface IAgentMapper extends MPJBaseMapper<AgentDO> {

    @Select({"<script>select distinct ${searchFiled} from s_agent_user where del_flag = 0",
            "<if test='agentTel != null'>and agent_tel like concat('%',#{agentTel},'%')</if>",
            "<if test='agentName != null'>and agent_name like concat('%',#{agentName},'%')</if></script>"})
    List<String> searchTableFiled(AgentFieldDTO param);
}
